Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

83
Visualizações
I have this table where I have several column. Last two of them are sticky ("is-sticky" class). I want to apply some styles to the first sticky column
<td> ...</td>
...
...
...
<td class="is-sticky">...</td> <-- want to apply style here
<td class="is-sticky">...</td> <-- no styles here

In the above code. Probably there are multiple sticky columns after the first one. But the style i want to add is only for the first column.

almost 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Pure CSS : Select every element of the class that is the sibling of the same class > invert it and select the class again.

:not(.is-sticky ~ .is-sticky).is-sticky {
  color: red;
}
<table>
  <tr>
    <td> .asdasd..</td>
    <td class="is-sticky">.. Frist .</td>
    <td class="is-sticky">... Second</td>
    <td class="is-sticky">... Third</td>
  </tr>
</table>

almost 4 years ago · Santiago Trujillo Relatório

0

You can add multiple classes to an element like this

<td class="is-sticky yourCSSClass">
almost 4 years ago · Santiago Trujillo Relatório

0

add another class to the first one "class ="is-sticky first-column"

Then in css u can easily call to only the first column.

.first-column .is-sticky {
    color: white;
    etc;
}
almost 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda